<?php
class Apps_Mail_Template_Abstract {
	protected $_transport;
    protected $_encode = 'utf-8';
	protected $_subject;
	protected $_body;

	public function getTransport() { return $this->_transport; }
	public function getEncode()    { return $this->_encode;    }
	public function getSubject()   { return $this->_subject;   }
	public function getBody()      { return $this->_body;      }

    public function sendTo($to) {
        $mail = new Apps_Mail();
        $mail->setSubject($this->getSubject())
             ->setBodyHtml($this->getBody());

        if(is_array($to)) {
            foreach ($to as $i => $email) {
                $mail->addTo($email);
                $mail->send($this->getTransport());
                //$mail->clearTo();
            }
        } else {
            $mail->addTo($to);
            $mail->send($this->getTransport());
        }
    }
}